# your-rand-int

```bash
npm i your-rand-int
```

### randInt(min, max)
- `min` <[number]> 最小值
- `max` <[number]> 最大值
- return <[number]> 随机值

获取指定范围的随机整数

```js
import randInt from 'your-rand-int'

// 正常传入 [10, 20]
randInt(10, 20)

// 支持负数 [-10, 20]
randInt(-10, 20)

// 从大到小 [20, 30]
randInt(30, 20)

// 带小数和字符串的参数，会自动转为整数 [-1, 3]
randInt(3.1, '-1.2')
```

[number]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type "Number"
